Optimal. Leaf size=88 \[ \frac {\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}-\frac {a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{b^3 \sqrt {a+b}}-\frac {(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac {\cosh ^3(x) \sinh (x)}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3266, 481, 592,
536, 212, 214} \begin {gather*} -\frac {a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{b^3 \sqrt {a+b}}+\frac {x \left (8 a^2-4 a b+3 b^2\right )}{8 b^3}-\frac {(4 a-3 b) \sinh (x) \cosh (x)}{8 b^2}+\frac {\sinh (x) \cosh ^3(x)}{4 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 214
Rule 481
Rule 536
Rule 592
Rule 3266
Rubi steps
\begin {align*} \int \frac {\cosh ^6(x)}{a+b \cosh ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^3 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac {\cosh ^3(x) \sinh (x)}{4 b}-\frac {\text {Subst}\left (\int \frac {x^2 \left (3 a+(a-3 b) x^2\right )}{\left (1-x^2\right )^2 \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{4 b}\\ &=-\frac {(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac {\cosh ^3(x) \sinh (x)}{4 b}+\frac {\text {Subst}\left (\int \frac {-a (4 a-3 b)+\left (-4 a^2+a b-3 b^2\right ) x^2}{\left (1-x^2\right ) \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{8 b^2}\\ &=-\frac {(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac {\cosh ^3(x) \sinh (x)}{4 b}-\frac {a^3 \text {Subst}\left (\int \frac {1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{b^3}+\frac {\left (8 a^2-4 a b+3 b^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\coth (x)\right )}{8 b^3}\\ &=\frac {\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}-\frac {a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{b^3 \sqrt {a+b}}-\frac {(4 a-3 b) \cosh (x) \sinh (x)}{8 b^2}+\frac {\cosh ^3(x) \sinh (x)}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 76, normalized size = 0.86 \begin {gather*} \frac {4 \left (8 a^2-4 a b+3 b^2\right ) x-\frac {32 a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-8 (a-b) b \sinh (2 x)+b^2 \sinh (4 x)}{32 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(272\) vs.
\(2(74)=148\).
time = 0.59, size = 273, normalized size = 3.10
method | result | size |
risch | \(\frac {x \,a^{2}}{b^{3}}-\frac {a x}{2 b^{2}}+\frac {3 x}{8 b}+\frac {{\mathrm e}^{4 x}}{64 b}-\frac {{\mathrm e}^{2 x} a}{8 b^{2}}+\frac {{\mathrm e}^{2 x}}{8 b}+\frac {{\mathrm e}^{-2 x} a}{8 b^{2}}-\frac {{\mathrm e}^{-2 x}}{8 b}-\frac {{\mathrm e}^{-4 x}}{64 b}+\frac {\sqrt {a \left (a +b \right )}\, a^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {a \left (a +b \right )}+2 a +b}{b}\right )}{2 \left (a +b \right ) b^{3}}-\frac {\sqrt {a \left (a +b \right )}\, a^{2} \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {a \left (a +b \right )}-2 a -b}{b}\right )}{2 \left (a +b \right ) b^{3}}\) | \(170\) |
default | \(\frac {2 a^{3} \left (-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}\right )}{b^{3}}+\frac {1}{4 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{4}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {4 a -7 b}{8 b^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {4 a -5 b}{8 b^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (-8 a^{2}+4 a b -3 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{8 b^{3}}-\frac {1}{4 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{4}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {-4 a +7 b}{8 b^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {4 a -5 b}{8 b^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (8 a^{2}-4 a b +3 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{8 b^{3}}\) | \(273\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 651 vs.
\(2 (74) = 148\).
time = 0.50, size = 651, normalized size = 7.40 \begin {gather*} -\frac {15 \, {\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{64 \, \sqrt {{\left (a + b\right )} a} b} - \frac {5 \, \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{32 \, \sqrt {{\left (a + b\right )} a}} - \frac {3 \, {\left (2 \, a + b\right )} x}{2 \, b^{2}} + \frac {15 \, x}{16 \, b} - \frac {{\left (4 \, {\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} - b\right )} e^{\left (4 \, x\right )}}{64 \, b^{2}} + \frac {3 \, e^{\left (2 \, x\right )}}{16 \, b} - \frac {3 \, e^{\left (-2 \, x\right )}}{16 \, b} + \frac {{\left (4 \, {\left (2 \, a + b\right )} e^{\left (2 \, x\right )} - b\right )} e^{\left (-4 \, x\right )}}{64 \, b^{2}} + \frac {3 \, {\left (2 \, a + b\right )} \log \left (b e^{\left (4 \, x\right )} + 2 \, {\left (2 \, a + b\right )} e^{\left (2 \, x\right )} + b\right )}{16 \, b^{2}} - \frac {3 \, {\left (2 \, a + b\right )} \log \left (2 \, {\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} + b e^{\left (-4 \, x\right )} + b\right )}{16 \, b^{2}} + \frac {3 \, {\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{64 \, \sqrt {{\left (a + b\right )} a} b^{2}} - \frac {3 \, {\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{64 \, \sqrt {{\left (a + b\right )} a} b^{2}} + \frac {{\left (16 \, a^{2} + 16 \, a b + 3 \, b^{2}\right )} x}{8 \, b^{3}} - \frac {{\left (16 \, a^{2} + 16 \, a b + 3 \, b^{2}\right )} \log \left (b e^{\left (4 \, x\right )} + 2 \, {\left (2 \, a + b\right )} e^{\left (2 \, x\right )} + b\right )}{64 \, b^{3}} + \frac {{\left (16 \, a^{2} + 16 \, a b + 3 \, b^{2}\right )} \log \left (2 \, {\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} + b e^{\left (-4 \, x\right )} + b\right )}{64 \, b^{3}} - \frac {{\left (32 \, a^{3} + 48 \, a^{2} b + 18 \, a b^{2} + b^{3}\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{128 \, \sqrt {{\left (a + b\right )} a} b^{3}} + \frac {{\left (32 \, a^{3} + 48 \, a^{2} b + 18 \, a b^{2} + b^{3}\right )} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{128 \, \sqrt {{\left (a + b\right )} a} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 524 vs.
\(2 (74) = 148\).
time = 0.40, size = 1245, normalized size = 14.15 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 150 vs.
\(2 (74) = 148\).
time = 0.42, size = 150, normalized size = 1.70 \begin {gather*} -\frac {a^{3} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b^{3}} + \frac {b e^{\left (4 \, x\right )} - 8 \, a e^{\left (2 \, x\right )} + 8 \, b e^{\left (2 \, x\right )}}{64 \, b^{2}} + \frac {{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x}{8 \, b^{3}} - \frac {{\left (48 \, a^{2} e^{\left (4 \, x\right )} - 24 \, a b e^{\left (4 \, x\right )} + 18 \, b^{2} e^{\left (4 \, x\right )} - 8 \, a b e^{\left (2 \, x\right )} + 8 \, b^{2} e^{\left (2 \, x\right )} + b^{2}\right )} e^{\left (-4 \, x\right )}}{64 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.33, size = 178, normalized size = 2.02 \begin {gather*} \frac {{\mathrm {e}}^{4\,x}}{64\,b}-\frac {{\mathrm {e}}^{-4\,x}}{64\,b}+\frac {x\,\left (8\,a^2-4\,a\,b+3\,b^2\right )}{8\,b^3}+\frac {{\mathrm {e}}^{-2\,x}\,\left (a-b\right )}{8\,b^2}-\frac {{\mathrm {e}}^{2\,x}\,\left (a-b\right )}{8\,b^2}+\frac {a^{5/2}\,\ln \left (\frac {4\,a^3\,{\mathrm {e}}^{2\,x}}{b^4}-\frac {2\,a^{5/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{b^4\,\sqrt {a+b}}\right )}{2\,b^3\,\sqrt {a+b}}-\frac {a^{5/2}\,\ln \left (\frac {4\,a^3\,{\mathrm {e}}^{2\,x}}{b^4}+\frac {2\,a^{5/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{b^4\,\sqrt {a+b}}\right )}{2\,b^3\,\sqrt {a+b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________